package com.deer.wms.base.system.service.calendar;

import com.deer.wms.base.system.dao.calendar.CalendarMapper;
import com.deer.wms.base.system.model.calendar.Calendar;
import com.deer.wms.common.core.service.AbstractService;
import com.deer.wms.common.core.text.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CalendarServiceImpl extends AbstractService<Calendar, Integer> implements CalendarService {
    @Autowired
    private CalendarMapper calendarMapper;
    @Override
    public Calendar findCalendarById(Integer id) {
        return calendarMapper.findCalendarById(id);
    }

    @Override
    public List<Calendar> findCalendarList( ) {
        return calendarMapper.findCalendarList();
    }

    @Override
    public int delectCalendarById(Integer id) {
        return calendarMapper.delectCalendarById(id);
    }

    @Override
    public int delectCalendarByIds(String ids) {
        return calendarMapper.delectCalendarByIds(Convert.toStrArray(ids));
    }

    @Override
    public int updateCalendar(Calendar calendar) {
        return calendarMapper.updateCalendar(calendar);
    }

    @Override
    public int saveCalendar(Calendar calendar) {
        return calendarMapper.saveCalendar(calendar);
    }
}
